// 全局样式

@font-face {
  font-family: 'DMSans';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/DMSans.woff2) format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/Montserrat.woff2) format('woff2');
}

.btn-icon {
  font-size: 10px;
}

.el-btn-red {
  color: #fa6962 !important;

  &:hover {
    opacity: 0.9;
  }

  &:active {
    opacity: 0.7;
  }
}

// 顶部进度条颜色
#nprogress .bar {
  background-color: color-mix(in srgb, var(--main-color) 65%, white);
}

// 处理移动端组件兼容性
@media screen and (max-width: $device-phone) {
  * {
    cursor: default !important;
  }

  .el-col2 {
    margin-top: 15px;
  }
}

// 背景滤镜
*,
::before,
::after {
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
}

// 色弱模式
.color-weak {
  filter: invert(80%);
  -webkit-filter: invert(80%);
}

#noop {
  display: none;
}

// 语言切换选中样式
.langDropDownStyle {
  // 选中项背景颜色
  .is-selected {
    background-color: rgba(var(--art-gray-200-rgb), 0.8) !important;
  }

  // 语言切换按钮菜单样式优化
  .lang-btn-item {
    .el-dropdown-menu__item {
      padding-left: 13px !important;
      padding-right: 6px !important;
      margin-bottom: 3px !important;
    }

    &:last-child {
      .el-dropdown-menu__item {
        margin-bottom: 0 !important;
      }
    }

    .menu-txt {
      min-width: 60px;
      display: block;
    }

    i {
      font-size: 10px;
      margin-left: 10px;
    }
  }
}

// 盒子边框
[data-box-mode='border-mode'] {
  .page-content,
  .art-custom-card {
    border: 1px solid var(--art-card-border) !important;
  }

  .layout-sidebar {
    border-right: 1px solid var(--art-card-border) !important;
  }
}

// 盒子阴影
[data-box-mode='shadow-mode'] {
  .page-content,
  .art-custom-card {
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(var(--art-gray-300-rgb), 0.3) !important;
  }

  .layout-sidebar {
    border-right: 1px solid rgba(var(--art-gray-300-rgb), 0.4) !important;
  }
}

html,
body {
  touch-action: none; /* 禁用触摸事件 */
  overflow-x: hidden; /* 禁用横向滚动 */
}

// 元素全屏
.el-full-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 500;
  margin-top: 0;
  padding: 15px;
  box-sizing: border-box;
  background-color: var(--art-main-bg-color);

  .art-table-full-screen {
    height: 100% !important;
  }
}

// 表格卡片
.art-table-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  border-radius: calc(var(--custom-radius) / 2 + 2px) !important;

  .el-card__body {
    height: 100%;
    overflow: hidden;
  }
}
